package qdu.edu.com.fushanf4.utils;

import org.apache.hadoop.mapreduce.Job;

import java.io.IOException;

public abstract class DriverUtil {

    /**
     * * 该方法用来配置Job并运行
     * @param path 输入路径和输出路径，path[0]为输入路径，path[1]为输出路径
     * @return 返回Job
     */
    public abstract Job runJob(String[] path) throws IOException;

    public void run(String[] path) throws IOException {
        // 实际运行时调用
        Job job = runJob(path);
        assert job.isSuccessful();
    }
}
